import request from '@/utils/request'

// 查询仓库发起无信息件的售后列表
export function getTrackingNumbersCount(query) {
  return request({
    url: '/product/SampleAfterSalesOrder/getTrackingNumbersCount',
    method: 'get',
    params: query
  })
}
// 查询仓库发起无信息件的售后列表
export function getSampyleAfterSalesOderToconfirmList(query) {
  return request({
    url: '/product/SampleAfterSalesOrder/getSampyleAfterSalesOderToconfirmList',
    method: 'get',
    params: query
  })
}
// 查询仓库发起无信息件的售后列表
export function spuByFabric(query) {
  return request({
    url: '/product/template/spuByFabric',
    method: 'get',
    params: query
  })
}
// 查询仓库发起无信息件的售后列表
export function listSampleAfterSalesOrder(query) {
  return request({
    url: '/product/SampleAfterSalesOrder/list',
    method: 'get',
    params: query
  })
}
// 查询仓库发起无信息件的售后列表
export function getExpressInfo(query) {
  return request({
    url: '/product/SampleAfterSalesOrder/getExpressInfo'+'?trackingNumber=' + query,
    method: 'get',
    // params: query
  })
}
// 查询仓库发起无信息件的售后列表
export function cancalSubmit(query) {
  return request({
    url: '/product/SampleAfterSalesOrder/cancalSubmit'+'?trackingNumber=' + query,
    method: 'get',
    // params: query
  })
}
// 查询仓库发起无信息件的售后列表
export function getProductCode(query) {
  return request({
    url: '/product/SampleAfterSalesOrder/getProductCode',
    method: 'get',
    params: query
  })
}
// 查询仓库发起无信息件的售后列表
export function vievList(query) {
  return request({
    url: '/product/SampleAfterSalesOrder/viewList',
    method: 'get',
    params: query
  })
}
// 查询仓库发起无信息件的售后列表
export function countDistinctByStatus(query) {
  return request({
    url: '/product/SampleAfterSalesOrder/countDistinctByStatus',
    method: 'get',
    params: query
  })
}
// 查询仓库发起无信息件的售后详细
export function getSampleAfterSalesOrder(id) {
  return request({
    url: '/product/SampleAfterSalesOrder/' + id,
    method: 'get'
  })
}
// 查询仓库发起无信息件的售后详细
export function SampleAfterSalesOrder(data) {
  return request({
    url: '/product/SampleAfterSalesOrder/'+ data.ids + '?status=' + data.status,
      // ,
    method: 'post',
    // data:data
  })
}
// 新增仓库发起无信息件的售后
export function sumbitApply(data) {
  return request({
    url: '/product/SampleAfterSalesOrder/sumbitApply/'+data.trackingNumber,
    method: 'post',
    // data: data
  })
}
// 新增仓库发起无信息件的售后
export function mergeOrders(data) {
  return request({
    url: '/product/SampleAfterSalesOrder/mergeOrders/'+data.trackingNumber,
    method: 'post',
    // data: data
  })
}
// 新增仓库发起无信息件的售后
export function trackingNumber(data) {
  return request({
    url: '/product/SampleAfterSalesOrder/trackingNumber/'+data.trackingNumber,
    method: 'post',
    // data: data
  })
}
// 新增仓库发起无信息件的售后
export function parseSku(data) {
  return request({
    url: '/product/SampleAfterSalesOrder/parseSku'+'?sku=' + data.sku,
    method: 'post',
    // data: data
  })
}
// 新增仓库发起无信息件的售后
export function checkExpressNumber(data) {
  return request({
    url: '/product/sampleReturn/checkExpressNumber ',
    method: 'post',
    data: data
  })
}
// 新增仓库发起无信息件的售后
export function addSampleAfterSalesOrder(data) {
  return request({
    url: '/product/SampleAfterSalesOrder',
    method: 'post',
    data: data
  })
}
// 修改仓库发起无信息件的售后
export function updateSampleAfterSalesOrder(data) {
  return request({
    url: '/product/SampleAfterSalesOrder',
    method: 'put',
    data: data
  })
}
// 修改仓库发起无信息件的售后
export function viewEditTrackingInfo(data) {
  return request({
    url: '/product/SampleAfterSalesOrder/viewEditTrackingInfo',
    method: 'put',
    data: data
  })
}
// // 修改仓库发起无信息件的售后
// export function viewEditTrackingInfo(data) {
//   return request({
//     url: '/product/SampleAfterSalesOrder/viewEditTrackingInfo'+'?trackingNumber='+data.tracking,
//     method: 'put',
//     data: data
//   })
// }
// 删除仓库发起无信息件的售后
export function delSampleAfterSalesOrder(id) {
  return request({
    url: '/product/SampleAfterSalesOrder/' + id,
    method: 'delete'
  })
}
